﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using FwProject.Comm.ExcelUtil;

namespace FwProject.Distribution.Dto
{
    [DisplayName(displayName:"配送单")]
    public class DistributionDetailsListViewDto
    {
        [ExcelDateMember(IsMultiRow = false, IsMerged = true, IsClass = false)]
        [DisplayName(displayName: "配送单号")]
        public string CreationNumber { get; set; }

        [ExcelDateMember(IsMultiRow = false, IsMerged = true, IsClass = false)]
        [DisplayName(displayName: "配送日期")]
        public DateTime DistributionDate { get; set; }

        [ExcelDateMember(IsMultiRow = false, IsMerged = true, IsClass = false)]
        [DisplayName(displayName: "餐厅名称")]
        public string RestaurantName { get; set; }

        public long DriverId { get; set; }

        [ExcelDateMember(IsMultiRow = false, IsMerged = true, IsClass = false)]
        [DisplayName(displayName: "司机")]
        public string DriverName { get; set; }

        [ExcelDateMember(IsMultiRow = false, IsMerged = true, IsClass = false)]
        [DisplayName(displayName: "车牌号")]
        public string PlatesNumber { get; set; }

        [ExcelDateMember(IsMultiRow = false, IsMerged = true, IsClass = false)]
        [DisplayName(displayName: "店存")]
        public string Stock { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = true, ListOne=false)]
        public List<DistributionDetailsModel> DistributionDetailLists { get; set; }
    }

    public class DistributionDetailsModel
    {
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false)]
        [DisplayName(displayName: "货品型号")]
        public string TypeNumberName { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false,IsSum =true)]
        [DisplayName(displayName: "配送箱数")]
        public int Distributioncount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "配送套数")]
        public int DistributionBycount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "回收箱数")]
        public int Recoverycount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "回收套数")]
        public int RecoveryBycount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "换货箱数")]
        public int Exchangegoodscount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "换货套数")]
        public int ExchangegoodsBycount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "折损套数")]
        public int Damagecount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "赠送箱数")]
        public int Givecount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "赠送套数")]
        public int GiveBycount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "退回箱数")]
        public int Backboxcount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "退回套数")]
        public int Backnumbercount { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "单价")]
        public decimal TypeNumberPrice { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsClass = false, IsSum = true)]
        [DisplayName(displayName: "应收金额")]
        public decimal SumPrice { get; set; }
    }
}
